/* 
 * Enterprise Library Extensions - DI + ORM.
 * Copyright (C) 2006
 *
 * GNU General Public License
 *
 * This program is free software; you can redistribute 
 * it and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 */
using System;

namespace ELE.EnterpriseLibrary.Naming
{
  /// <summary>
  /// This interface is used for parsing names from a hierarchical namespace. 
  /// The NameParser contains knowledge of the syntactic information (like left-to-right orientation, 
  /// name separator, etc.) needed to parse names. The equals() method, when used to compare two 
  /// NameParsers, returns true if and only if they serve the same namespace.
	/// </summary>
	public interface INameParser
	{
    /// <summary>
    /// Parses a name into its components
    /// </summary>
    /// <param name="name">The non-null string name to parse</param>
    /// <returns>A non-null parsed form of the name using the naming convention of this parser</returns>
    /// <exception cref="NamingException">Can be thrown</exception>
		IName Parse(string name);
	}
}
